package hibernate.administratorAccount;
import hibernate.p.TelNumber;
import hibernate.p.Address;
import java.util.Date;

public class EmployeeInfo implements java.io.Serializable{
	private String firstName=new String();
	private String lastName=new String();
	private String middleName=new String();
	private int age=0;
	private boolean sex=false;
	private Date birthday=new Date();
	private String note=new String();
	private String userName=new String();
	private String password=new String();
	private Long id=new Long(0);
	private String backupPassword=new String();
	private TelNumber telNumber1=new TelNumber(-1,-1,-1,-1);
	private TelNumber telNumber2=new TelNumber(-1,-1,-1,-1);
	private TelNumber telNumber3=new TelNumber(-1,-1,-1,-1);
	private TelNumber telNumber4=new TelNumber(-1,-1,-1,-1);
	private Address address=new Address(null,null,null,null);
	private Employee employee;
	
	public void setEmployee(Employee employee){
		this.employee=employee;
	}
	
	public Employee getEmployee(){return employee;}
	
	public void setFirstName(String firstName){
		this.firstName=firstName;
	}
	public String getFirstName(){
		return firstName;
	}
	public void setLastName(String lastName){
		this.lastName=lastName;
	}
	public String getLastName(){
		return lastName;
	}
	public void setMiddleName(String middleName){
		this.middleName=middleName;
	}
	public String getMiddleName(){
		return middleName;
	}
	public void setAge(int age){
		this.age=age;
	}
	public int getAge(){
		return age;
	}
	public void setSex(boolean sex){
		this.sex=sex;
	}
	public boolean getSex(){
		return sex;
	}
	public void setBirthday(Date birthday){
		this.birthday=birthday;
	}
	public Date getBirthday(){
		return birthday;
	}
	public void setNote(String note){
		this.note=note;
	}
	public String getNote(){
		return note;
	}
	public void setUserName(String username){
		userName=username;
	}
	public String getUserName(){
		return userName;
	}
	public void setPassword(String password){
		this.password=password;
	}
	public String getPassword(){
		return password;
	}
	public void setId(Long id){
		this.id=id;
	}
	public Long getId(){
		return id;
	}
	public void setBackupPassword(String backuppassword){
		backupPassword=backuppassword;
	}
	public String getBackupPassword(){
		return backupPassword;
	}
	public void setTelNumber1(String telNumber){
		telNumber1=TelNumber.parseString(telNumber);
	}
	public String getTelNumber1(){
		return telNumber1.toString();
	}
	public void setTelNumber2(String telNumber){
		telNumber2=TelNumber.parseString(telNumber);
	}
	public String getTelNumber2(){
		return telNumber2.toString();
	}
	public void setTelNumber3(String telNumber){
		telNumber3=TelNumber.parseString(telNumber);
	}
	public String getTelNumber3(){
		return telNumber3.toString();
	}
	public void setTelNumber4(String telNumber){
		telNumber4=telNumber1.parseString(telNumber);
	}
	public String getTelNumber4(){
		return telNumber4.toString();
	}
	public void setAddress(String address){
		this.address=Address.parseAddress(address);
	}
	public String getAddress(){
		return address.toString();
	}
	
	public boolean equals(Object emInfo){
		if(!(emInfo instanceof EmployeeInfo))
			return false;
		else return ((EmployeeInfo)emInfo).id.equals(this.id) ? true : false;
	}
	
}
